package library.operation;

import library.book.BookList;

import java.util.Scanner;

public class FindOpretation implements Opretation{
    public void work(BookList bookList) {
        System.out.println("查找图书");
        Scanner scanner = new Scanner(System.in);
        String name = scanner.nextLine();
        for (int i = 0; i < bookList.getBooksize(); i++) {
            if(name.equals(bookList.getbooks()[i].getName())) {
                System.out.println(bookList.getbooks()[i]);
            }
        }
        System.out.println("没有找到该书");
    }
}
